using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_BOMRuleMap : EntityTypeConfiguration<t_BOMRule>
    {
        public t_BOMRuleMap()
        {
            // Primary Key
            this.HasKey(t => t.FInterID);

            // Properties
            this.Property(t => t.FInterID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FBillNo)
                .IsRequired()
                .HasMaxLength(30);

            this.Property(t => t.FGroupID)
                .IsRequired()
                .HasMaxLength(300);

            this.Property(t => t.FGroupName)
                .IsRequired()
                .HasMaxLength(1000);

            // Table & Column Mappings
            this.ToTable("t_BOMRule");
            this.Property(t => t.FInterID).HasColumnName("FInterID");
            this.Property(t => t.FClassTypeID).HasColumnName("FClassTypeID");
            this.Property(t => t.FBillNo).HasColumnName("FBillNo");
            this.Property(t => t.FBiller).HasColumnName("FBiller");
            this.Property(t => t.FDate).HasColumnName("FDate");
            this.Property(t => t.FGroupID).HasColumnName("FGroupID");
            this.Property(t => t.FGroupName).HasColumnName("FGroupName");
            this.Property(t => t.FItemID).HasColumnName("FItemID");
        }
    }
}
